package com.chris.vue.service;

import com.chris.vue.models.items.GoodsInfoItem;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Chris Chan
 * 2020/8/18 5:38
 * Use for:
 * Explain:
 */
@Service
public class GoodsService {
    private String[] imageUrls = {
            "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2125121368,1221676063&fm=26&gp=0.jpg",
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597719255726&di=e5313435b1c87630053727595e611d15&imgtype=0&src=http%3A%2F%2Fimg4.imgtn.bdimg.com%2Fit%2Fu%3D172587034%2C2100548969%26fm%3D214%26gp%3D0.jpg",
            "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3383213117,935263667&fm=26&gp=0.jpg"
    };

    public List<GoodsInfoItem> getGoodsList() {
        List<GoodsInfoItem> goodsInfoItemList = new ArrayList<>(16);
        goodsInfoItemList.add(new GoodsInfoItem("红豆衬衫", imageUrls[0], 120.0, 1135, "测试数据 衬衫"));
        goodsInfoItemList.add(new GoodsInfoItem("宝华电脑", imageUrls[1], 12045.0, 15675, "测试数据 电脑"));
        goodsInfoItemList.add(new GoodsInfoItem("长江啤酒", imageUrls[2], 18.0, 155675, "测试数据 啤酒"));
        return goodsInfoItemList;
    }
}
